Integrand size = 26, antiderivative size = 82 \[ \int (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x)) \, dx=\frac {2 \sqrt [4]{-1} a d^{3/2} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 i a (d \tan (e+f x))^{3/2}}{3 f} \]
2*(-1)^(1/4)*a*d^(3/2)*arctan((-1)^(3/4)*(d*tan(f*x+e))^(1/2)/d^(1/2))/f+2 *a*d*(d*tan(f*x+e))^(1/2)/f+2/3*I*a*(d*tan(f*x+e))^(3/2)/f
Time = 0.43 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.87 \[ \int (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x)) \, dx=\frac {2 a d \left (3 \sqrt [4]{-1} \sqrt {d} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )+(3+i \tan (e+f x)) \sqrt {d \tan (e+f x)}\right )}{3 f} \]
(2*a*d*(3*(-1)^(1/4)*Sqrt[d]*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt [d]] + (3 + I*Tan[e + f*x])*Sqrt[d*Tan[e + f*x]]))/(3*f)
Time = 0.44 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3042, 4011, 3042, 4011, 3042, 4016, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+i a \tan (e+f x)) (d \tan (e+f x))^{3/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+i a \tan (e+f x)) (d \tan (e+f x))^{3/2}dx\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \sqrt {d \tan (e+f x)} (a d \tan (e+f x)-i a d)dx+\frac {2 i a (d \tan (e+f x))^{3/2}}{3 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {d \tan (e+f x)} (a d \tan (e+f x)-i a d)dx+\frac {2 i a (d \tan (e+f x))^{3/2}}{3 f}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \int \frac {-a d^2-i a \tan (e+f x) d^2}{\sqrt {d \tan (e+f x)}}dx+\frac {2 i a (d \tan (e+f x))^{3/2}}{3 f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {-a d^2-i a \tan (e+f x) d^2}{\sqrt {d \tan (e+f x)}}dx+\frac {2 i a (d \tan (e+f x))^{3/2}}{3 f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}\) |
\(\Big \downarrow \) 4016 |
\(\displaystyle \frac {2 a^2 d^4 \int \frac {1}{i a d^3 \tan (e+f x)-a d^3}d\sqrt {d \tan (e+f x)}}{f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 i a (d \tan (e+f x))^{3/2}}{3 f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {2 \sqrt [4]{-1} a d^{3/2} \arctan \left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}+\frac {2 a d \sqrt {d \tan (e+f x)}}{f}+\frac {2 i a (d \tan (e+f x))^{3/2}}{3 f}\) |
(2*(-1)^(1/4)*a*d^(3/2)*ArcTan[((-1)^(3/4)*Sqrt[d*Tan[e + f*x]])/Sqrt[d]]) /f + (2*a*d*Sqrt[d*Tan[e + f*x]])/f + (((2*I)/3)*a*(d*Tan[e + f*x])^(3/2)) /f
3.2.36.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2*(c^2/f) Subst[Int[1/(b*c - d*x^2), x], x, Sqrt[b *Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && EqQ[c^2 + d^2, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 304 vs. \(2 (65 ) = 130\).
Time = 0.93 (sec) , antiderivative size = 305, normalized size of antiderivative = 3.72
method | result | size |
derivativedivides | \(\frac {a \left (\frac {2 i \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+2 d \sqrt {d \tan \left (f x +e \right )}-2 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) | \(305\) |
default | \(\frac {a \left (\frac {2 i \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}+2 d \sqrt {d \tan \left (f x +e \right )}-2 d^{2} \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}+\frac {i \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) | \(305\) |
parts | \(\frac {2 a d \left (\sqrt {d \tan \left (f x +e \right )}-\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8}\right )}{f}+\frac {i a \left (\frac {2 \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-\frac {d^{2} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 \left (d^{2}\right )^{\frac {1}{4}}}\right )}{f}\) | \(305\) |
1/f*a*(2/3*I*(d*tan(f*x+e))^(3/2)+2*d*(d*tan(f*x+e))^(1/2)-2*d^2*(1/8/d*(d ^2)^(1/4)*2^(1/2)*(ln((d*tan(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/ 2)+(d^2)^(1/2))/(d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^ 2)^(1/2)))+2*arctan(2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-2*arctan(- 2^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1))+1/8*I/(d^2)^(1/4)*2^(1/2)*(ln ((d*tan(f*x+e)-(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2))/(d*ta n(f*x+e)+(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)*2^(1/2)+(d^2)^(1/2)))+2*arctan(2 ^(1/2)/(d^2)^(1/4)*(d*tan(f*x+e))^(1/2)+1)-2*arctan(-2^(1/2)/(d^2)^(1/4)*( d*tan(f*x+e))^(1/2)+1))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 310 vs. \(2 (64) = 128\).
Time = 0.26 (sec) , antiderivative size = 310, normalized size of antiderivative = 3.78 \[ \int (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x)) \, dx=-\frac {3 \, \sqrt {-\frac {4 i \, a^{2} d^{3}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-2 i \, a d^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {-\frac {4 i \, a^{2} d^{3}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a d}\right ) - 3 \, \sqrt {-\frac {4 i \, a^{2} d^{3}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-2 i \, a d^{2} e^{\left (2 i \, f x + 2 i \, e\right )} - \sqrt {-\frac {4 i \, a^{2} d^{3}}{f^{2}}} {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a d}\right ) - 16 \, {\left (2 \, a d e^{\left (2 i \, f x + 2 i \, e\right )} + a d\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{12 \, {\left (f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
-1/12*(3*sqrt(-4*I*a^2*d^3/f^2)*(f*e^(2*I*f*x + 2*I*e) + f)*log((-2*I*a*d^ 2*e^(2*I*f*x + 2*I*e) + sqrt(-4*I*a^2*d^3/f^2)*(f*e^(2*I*f*x + 2*I*e) + f) *sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))*e^(-2*I *f*x - 2*I*e)/(a*d)) - 3*sqrt(-4*I*a^2*d^3/f^2)*(f*e^(2*I*f*x + 2*I*e) + f )*log((-2*I*a*d^2*e^(2*I*f*x + 2*I*e) - sqrt(-4*I*a^2*d^3/f^2)*(f*e^(2*I*f *x + 2*I*e) + f)*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e ) + 1)))*e^(-2*I*f*x - 2*I*e)/(a*d)) - 16*(2*a*d*e^(2*I*f*x + 2*I*e) + a*d )*sqrt((-I*d*e^(2*I*f*x + 2*I*e) + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))/(f*e^( 2*I*f*x + 2*I*e) + f)
\[ \int (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x)) \, dx=i a \left (\int \left (- i \left (d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}}\right )\, dx + \int \left (d \tan {\left (e + f x \right )}\right )^{\frac {3}{2}} \tan {\left (e + f x \right )}\, dx\right ) \]
I*a*(Integral(-I*(d*tan(e + f*x))**(3/2), x) + Integral((d*tan(e + f*x))** (3/2)*tan(e + f*x), x))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 193 vs. \(2 (64) = 128\).
Time = 0.57 (sec) , antiderivative size = 193, normalized size of antiderivative = 2.35 \[ \int (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x)) \, dx=\frac {3 \, a d^{3} {\left (-\frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (2 i + 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\left (i - 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} + 8 i \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a d + 24 \, \sqrt {d \tan \left (f x + e\right )} a d^{2}}{12 \, d f} \]
1/12*(3*a*d^3*(-(2*I + 2)*sqrt(2)*arctan(1/2*sqrt(2)*(sqrt(2)*sqrt(d) + 2* sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d) - (2*I + 2)*sqrt(2)*arctan(-1/2*sqr t(2)*(sqrt(2)*sqrt(d) - 2*sqrt(d*tan(f*x + e)))/sqrt(d))/sqrt(d) + (I - 1) *sqrt(2)*log(d*tan(f*x + e) + sqrt(2)*sqrt(d*tan(f*x + e))*sqrt(d) + d)/sq rt(d) - (I - 1)*sqrt(2)*log(d*tan(f*x + e) - sqrt(2)*sqrt(d*tan(f*x + e))* sqrt(d) + d)/sqrt(d)) + 8*I*(d*tan(f*x + e))^(3/2)*a*d + 24*sqrt(d*tan(f*x + e))*a*d^2)/(d*f)
Time = 0.52 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.37 \[ \int (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x)) \, dx=-\frac {2}{3} \, a {\left (\frac {3 i \, \sqrt {2} d^{\frac {3}{2}} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{f {\left (\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} + \frac {-i \, \sqrt {d \tan \left (f x + e\right )} d f^{2} \tan \left (f x + e\right ) - 3 \, \sqrt {d \tan \left (f x + e\right )} d f^{2}}{f^{3}}\right )} \]
-2/3*a*(3*I*sqrt(2)*d^(3/2)*arctan(8*sqrt(d^2)*sqrt(d*tan(f*x + e))/(4*I*s qrt(2)*d^(3/2) + 4*sqrt(2)*sqrt(d^2)*sqrt(d)))/(f*(I*d/sqrt(d^2) + 1)) + ( -I*sqrt(d*tan(f*x + e))*d*f^2*tan(f*x + e) - 3*sqrt(d*tan(f*x + e))*d*f^2) /f^3)
Time = 5.82 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.79 \[ \int (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x)) \, dx=\frac {a\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}\,2{}\mathrm {i}}{3\,f}+\frac {2\,a\,d\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{f}+\frac {{\left (-1\right )}^{1/4}\,a\,d^{3/2}\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,2{}\mathrm {i}}{f} \]